package com.dts.listener;

import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;
import jakarta.servlet.annotation.WebListener;

@WebListener
public class MyListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("监听器1");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("监听器2");
    }
}
